// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import com.nokia.symbian 1.1
import com.rogerio.cor 1.0

Item {
    id: root
    width: 100; height: 50

    property string texto : ""
    property color corInicial : Qt.black
    property alias corSelecionada : colorPicker.corSelecionada

    ColorPicker {
        id: colorPicker
        corSelecionada: corInicial
    }

    Row {
        anchors.fill: parent
        spacing: 5

        Button {
            text: texto
            onClicked: {
                colorPicker.Abrir();
            }
        }

        Rectangle {
            id: rectCor
            width: 50; height: 50
            color: colorPicker.corSelecionada
        }
    }
}
